import request from "@/utils/request";
export const submitApi = (data) => {
  return request({
    method: "post",
    url: "/login",
    data,
  });
};
export const getUserListApi = (params) => {
  return request({
    method: "get",
    url: "/users",
    params,
  });
};
export const changeStateApi = (id, type) => {
  return request({
    method: "put",
    url: `/users/${id}/state/${type}`,
  });
};
export const addUserInfoListApi = (data) => {
  return request({
    method: "post",
    url: "/users",
    data,
  });
};
export const delUserInfoListApi = (id) => {
  return request({
    method: "delete",
    url: `/users/${id}`,
  });
};
export const editUserInfoListApi = (id, data) => {
  return request({
    method: "put",
    url: `/users/${id}`,
    data,
  });
};
export const editGetUserInfoListApi = (id) => {
  return request({
    method: "get",
    url: `/users/${id}`,
  });
};
